%include
:- lib(ic), lib(listut).

testMotorHeavyWeight(Path, OState, Arg, Result, NState) :-
	Path > 0,
	% Domains
	[ODisplacement] :: -127 .. 128,
	[NDisplacement] :: -127 .. 128,
	[OMan] :: 0 .. 1,
	[NMan] :: 0 .. 1,
	% Constraints
	OState = [ODisplacement, OMan],
	NState = [NDisplacement, NMan],
	motorHeavyWeight(Path, OState, Arg, Result, NState),
	% Solving
	indomain(ODisplacement),
	indomain(NDisplacement),
	indomain(OMan),
	indomain(NMan).

motorHeavyWeight(1, [ODisplacement, OMan], [], Result, [NDisplacement, NMan]) :-
	% Invariant
	ODisplacement #>= 50,
	% Postcondition
	neg(NDisplacement #>= 100),
	neg(NDisplacement #= 50),
	Result = 'Nothing',
	% Object State Update
	NDisplacement #= ODisplacement,
	NMan #= OMan,
	% Invariant
	NDisplacement #>= 50.

